package frame.spring.aop;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Author: shen qi han
 * Date: 2022/3/28 上午12:57
 */
public class Main {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MyAopConfig.class);
        // mark !!! here , ioc contains save the user instance
        // but student
        User user = context.getBean(User.class);
        // show display
        user.display();
        // print jdk or cglib
        System.out.println(user.getClass().getSuperclass());
        // before display.
        // I'm a student.
        // class java.lang.reflect.Proxy
    }

}
